package com.erp.controller;

import com.erp.entity.result.Result;
import com.erp.entity.result.ResultStatus;
import com.erp.service.GoodsWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.websocket.server.PathParam;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@RestController
@RequestMapping("/goodsWarehouse")
public class GoodsWarehouseController {

    @Autowired
    private GoodsWarehouseService goodsWarehouseService;

    @GetMapping("/getAllInfoByGoodsId")
    public Result getAllInfoByGoodsId(@PathParam("gid") Integer gid) {
        return new Result(ResultStatus.SUCCESS, goodsWarehouseService.getAllInventoryInformationByGoodsId(gid));
    }


}
